


/*
Filename: C1_RunRegression.do
Goal: Conduct regression analysis using merged voting and EDGAR datasets to examine institutional voting behavior, information acquisition, and the relationship between holdings and governance engagement.
Contact: mjha@gsu.edu (author) and gormley@wustl.edu

Anonymized Pseudo Dataset:
We provide an anonymized pseudo dataset for replication purposes. Due to the smaller sample size in the pseudo dataset, the results reported in the paper cannot be replicated exactly. The code and structure remain valid, but coefficient estimates, standard errors, and statistical significance may differ from published results.

Regression Datasets
All datasets listed below are created through the data preparation pipeline and represent different analytic samples.
1. Main Voting Dataset
File: RegVotingVoting.dta
Source: Created by code in A6_MergeVoting
Description: Primary regression dataset merging holdings and voting data

2. Six-Month Lag Dataset
File: RegVoting6M.dta
Source: Created by code in A6_MergeVoting
Difference: Holdings data lagged by six months when merging with voting

3. Equity-Only Funds Dataset
File: RegVotingOnlyEquity.dta
Source: Created by code in A6_MergeVoting
Difference: Uses VA_AgainstISS.dta constructed from equity-only funds' votes

4. Fund-Level Dataset
File: RegVotingFund.dta
Source: Created by code in A6_MergeVoting
Difference: Voting data aggregated by npxfileid 
Holdings data aggregated by ticker

5. Management-Sponsored Proposals Dataset
File: RegVotingMSG.dta
Source: Created by code in A6_MergeVoting
Difference: Uses VA_AgainstISS.dta focusing on management-sponsored proposals 

6. Bond Rating Categories Dataset
File: RegVotingRating.dta
Source: Created by code in A6_MergeVoting
Difference: Bond holdings split into junk, non-junk, and unrated categories using Capital IQ data

7. EDGAR Activity Dataset
File: RegVotingEDGAR.dta
Source: Created by code in B3_MergeEDGAR
Description: Merges voting data with EDGAR access activity
*/


capture log close
capture restore
set more off
clear all


cd "/Users/mjha/GSU Dropbox Dropbox/Manish Jha/Research Shared/Gormley and Jha/01 Bond Beholder/Writing/JFQAFinalFiles/CodeSharing/RegAnon"
cd "/Users/mjha/GSU Dropbox Dropbox/Manish Jha/Research Shared/Gormley and Jha/01 Bond Beholder/Writing/JFQAFinalFiles/CodeSharing/RegPseudo"

global time = "month"
global institution = "parent_name"
global firm = "permco" 
global fe = "a(itemonagendaid institution_month) vce(cluster $institution year)"

******************************* Replication for Figure 1, Table 1 and Table 2 are skipped since they are descriptive.
******************************* Figure 2 - Non-Parametric Estimation of Voting Against ISS and Bond Holdings
use "RegVoting_pseudo.dta", clear 
gsort inv_bond
xtile decile = inv_bond if inv_bond > 0, nq(5)
replace decile = 0 if missing(decile)
tab decile

gsort decile
by decile: summarize inv_bond
forvalues i = 0(1)5 {
display `i'
gen dec`i' = 0
replace dec`i' = 1 if decile == `i' 
}

eststo clear
eststo: reghdfe AGSTISS_CT_SH dec1 dec2 dec3 dec4 dec5, $fe
esttab using "fig2nonparametric.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2
lincom _b[dec1], level(95)
lincom _b[dec2], level(95)
lincom _b[dec3], level(95)
lincom _b[dec4], level(95)
lincom _b[dec5], level(95)

******************************* TABLE 3 - Summary
use "RegVoting_pseudo.dta", clear 
summarize AGSTISS_CT_SH, detail
count if AGSTISS_CT_SH > 0
mean AGSTISS_CT_SH if AGSTISS_CT_SH > 0

summarize inv_bond, detail
count if inv_bond > 0
mean inv_bond if inv_bond > 0

summarize inv_equity, detail
count if inv_equity > 0
mean inv_equity if inv_equity > 0

summarize bondper, detail
count if bondper > 0
summarize bondper if inv_bond > 0

******************************* TABLE 4 - Against ISS
use "RegVoting_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond, $fe
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity, $fe
esttab using "tab4iss.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table 7 - Heterogeneity Across Fund Types
use "RegVoting_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_equity std_inv_bond_bf std_inv_bond_ef, $fe 
eststo: reghdfe AGSTISS_CT_SH std_inv_equity std_inv_bond_bf std_inv_bond_ef_ac std_inv_bond_ef_pa, $fe 
esttab using "tab7fundtypes.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table 8 - Voting Against ISS, Fund-level Analysis 
global fefund = "a(itemonagendaid fund_month) vce(cluster fund year)" 
use "RegVotingFund_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity, $fefund
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity std_inv_bondother std_inv_eqother, $fefund
esttab using "tab8fund.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table 9 - Heterogeneity Based on the Default Risk of Companies and Bonds
use "RegVoting_pseudo.dta", clear 
gen interact = std_inv_bond*edf
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond interact std_inv_equity, $fe 
drop interact

use "RegVotingRating_pseudo.dta", clear 
eststo: reghdfe AGSTISS_CT_SH std_inv_bond_jk std_inv_bond_nj std_inv_bond_nr std_inv_equity, $fe
esttab using "tab9default.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table 10 - Director Election
use "RegVoting_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity if direlection == 1, $fe
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity if direlection == 0, $fe
esttab using "tab10dir.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table A2 Equity Only Funds
use "RegVotingOnlyEquity_pseudo.dta", clear
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond, $fe
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity, $fe
esttab using "tabA2onlyequity.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table A3 excluding EDF
use "RegVoting_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity if !missing(edf), $fe
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity if (!missing(edf) & edf <= .75), $fe
esttab using "tabA3edf.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table A4 - Leverage
use "RegVoting_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity if de_dummy == 0, $fe
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity if de_dummy == 1, $fe
esttab using "tabA4leverage.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2

******************************* Table A5 - Less-perfunctory Management Proposals
use "RegVotingMSG_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_MSG std_inv_bond, $fe
eststo: reghdfe AGSTISS_CT_MSG std_inv_bond std_inv_equity, $fe
esttab using "tabA5management.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2

******************************* Table A7 - Six months ago data
use "RegVoting6M_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond, $fe
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_equity, $fe
esttab using "tabA7sixmonth.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


/******************************* Table A8 - Big3
** parent_name column is not there to keep data anonymized, cant be run using the anonymized data
gen big3 = 0
replace big3 = 1 if parent_name == "VANGUARD" | parent_name == "STATE STREET" | parent_name == "PNC"

gen std_inv_equity_big3 = std_inv_equity*big3
gen std_inv_bond_big3 = std_inv_bond*big3

eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_equity std_inv_equity_big3 std_inv_bond std_inv_bond_big3, $fe
esttab using "tabA8big3.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2
*/

******************************* Table A9 - Top Equity Holder
use "RegVoting_pseudo.dta", clear 
gen std_inv_equity_topholder = std_inv_equity*topholder
gen std_inv_bond_topholder = std_inv_bond*topholder

eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond std_inv_bond_topholder std_inv_equity std_inv_equity_topholder topholder, $fe
esttab using "tabA9topequity.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table A10 - Concave Functional Form
use "RegVoting_pseudo.dta", clear 
eststo clear
eststo: reghdfe AGSTISS_CT_SH std_inv_bond_sqrt, $fe
eststo: reghdfe AGSTISS_CT_SH std_inv_bond_sqrt std_inv_equity_sqrt, $fe
esttab using "tabA10concave.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


*****************************
****** EDGAR
global time = "month"
global institution = "parent_name"
global firm = "cik" 
global fe = "a(meetingid institution_month) vce(cluster $institution year)"

******************************* TABLE 5 - Summary
use "RegEDGAR_pseudo.dta", clear //we provide an anonymized sample
summarize edgardummy, detail
summarize edgardummy if edgardummy > 0

summarize inv_bond, detail
summarize inv_bond if inv_bond > 0

summarize inv_equity, detail
summarize inv_equity if inv_equity > 0

summarize bondper, detail
summarize bondper if inv_bond > 0


******************************* Table 6 - Governance Research Before Shareholder Meetings
use "RegEDGAR_pseudo.dta", clear 
eststo clear
eststo: reghdfe edgardummy std_inv_bond, $fe
eststo: reghdfe edgardummy std_inv_equity std_inv_bond, $fe 
eststo: reghdfe edgardummy std_inv_bond std_inv_equity if SPCS > 0, $fe
eststo: reghdfe edgardummy std_inv_bond std_inv_equity if SPCS == 0, $fe
esttab using "tab6edgarview.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table A1 - Governance Research and Additional Heterogeneity Across Meetings	
use "RegEDGAR_pseudo.dta", clear
eststo clear
eststo: reghdfe edgardummy std_inv_bond std_inv_equity if saypay > 0, $fe 
eststo: reghdfe edgardummy std_inv_bond std_inv_equity if saypay == 0, $fe 
esttab using "tabA1saypay.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2


******************************* Table A6 - Additional Robustness to Excluding Firms in Financial Distress
use "RegEDGAR_pseudo.dta", clear
eststo clear
eststo: reghdfe edgardummy std_inv_bond std_inv_equity if !missing(edf), $fe 
eststo: reghdfe edgardummy std_inv_bond std_inv_equity if edf <= .75 & !missing(edf), $fe 
esttab using "tabA6edgardistress.csv", star(* 0.10 ** 0.05 *** 0.01) replace r2
